#!/usr/bin/env python3
# -*- coding: utf-8 -*-

'测试json.dumps()编码问题'

import unittest
import json


class JSONTest(unittest.TestCase):

    def test_dumps(self):
        strDict = {'name': '毛毛', 'type': '前端开发工程师'}
        print(json.dumps(strDict, ensure_ascii=False, indent=2))
        str = '{"name":"毛毛"}'
        print(json.dumps(str, ensure_ascii=False, indent=2))



if __name__ == 'main':
    unittest.main()
